import 'package:flutter/material.dart';

import '../models/comparable.dart';
import '../models/serializable.dart';

/**
 * @author hanson
 * @version[创立日期，2023/9/7 13:43]
 * @function[功用简介 ]
 **/
class DataBean extends Serializable {
   int id=0;
   String title='';
   //int age=0;
   String address='';
   int sort = 0;

  @override
  // TODO: implement compareFields
  List get compareFields => throw UnimplementedError();

   DataBean.fromJson(Map? bean) {
     if (bean == null || !bean.containsKey('id')) return;
     id = bean['id'];
     //age = bean['age'];
     address = bean['address'];
     title = bean['title'];

   }

  @override
  Map toJson() {
    return {
      'id': id,
      'title': title,
     // 'age': age,
      'address': address,
      'sort': sort,
    };
  }
}